<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:68:"/home/wwwroot/www.xgw0851.com/application/index/view/index/jyps.html";i:1530436881;s:69:"/home/wwwroot/www.xgw0851.com/application/index/view/public/base.html";i:1530280572;s:72:"/home/wwwroot/www.xgw0851.com/application/index/view/public/cartNav.html";i:1530436933;s:77:"/home/wwwroot/www.xgw0851.com/application/index/view/public/previewimage.html";i:1498718790;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title><?php echo $title; ?></title>
<link rel="stylesheet" href="__PUBLIC__/xsd/css/mui.min.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/xsd/css/icons-extra.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/xsd/css/app.css?v1111121" />

</head>
<!--/head-->
<body>


	<!--/header-->



<div class="hdcom">
  <header class="mui-bar mui-bar-nav" style="z-index:7">
  			<h1 class="mui-title"><?php echo $title; ?></h1>
        <a class="mui-icon mui-icon-contact mui-pull-right" href="<?php echo url('index/user/index'); ?>"></a>
  </header>
  <div class="pref-info" style="left: 0px; right: 0px; top: 44px; z-index: 7;position: fixed;">
      <span class="pref-text"><?php echo get_table_field('1','id', 'content', 'Page'); ?></span>
  </div>

  <div class="zcnav">
   <div   class="cnavcom">
   				<div class="mui-card-content">
   					<div class="mui-card-content-inner" style="padding: 2px 0;overflow: hidden;">
              <a  href="#content" class=" catnav ">推荐商品</a>
               <?php if(is_array($Goodscatlist) || $Goodscatlist instanceof \think\Collection): $i = 0; $__LIST__ = $Goodscatlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                 <a  href="#content<?php echo $vo['id']; ?>" class=" catnav <?php if($vo['id'] == $cat_id): ?>catactive<?php endif; ?>"><?php echo $vo['cat_name']; ?></a>
               <?php endforeach; endif; else: echo "" ;endif; ?>
   					</div>
   				</div>
   	</div>
  </div>

</div>

<div class="mui-content mui-row avoidContentHidden" style="padding-bottom: 50px;">


  <a class="anchor anchor_fixed" id="content"></a>
    <div>
      <dl >
        <dt>
            <div class="category-title">
                <strong class="category-name">推荐商品</strong>
                <span class="category-description"></span>
            </div>
        </dt>
        <?php if(is_array($TjList) || $TjList instanceof \think\Collection): $i = 0; $__LIST__ = $TjList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;?>
          <dd  data-ruleid="<?php echo $item['goodsrule'][0]['id']; ?>"  data-goodid="<?php echo $item['id']; ?>" style="padding-bottom: 0;">
              <span class="foodimg" style="    flex: 7;"><img  src="<?php echo get_cover($item['cover_id'],'path','400x218'); ?>" style="height:120px;" data-preview-src="" data-preview-group="<?php echo $item['id']; ?>">

                (点击图片放大缩小图片)
              </span>
              <section class="foodinfo" style="    padding: 0;"   >
                  <div onclick='javascript:window.location.href="<?php echo url($detailUrl,['id'=>$item['id']]); ?>"' >
                    <header class="foodtitle" ><span><?php echo $item['good_name']; if($item['is_timelimit'] == '1'): ?><span style="color:red">(限时团购)</span>
                      <?php endif; ?></span>
                    </header>
                    <!-- <p class="mui-ellipsis fooddescription" style="margin:3px 0;">商家:<?php echo get_table_field($item['shop_id'],"id","shopname","goodshops"); ?></p> -->


                    <p class="fooddescription"  style="margin:3px 0;font-weight: bold;color:red;">配送说明:
                      <?php if($item['isshowdelivery'] == '1'): ?>
                        <?php echo $item['deliverydec']; else: ?>
                        <?php echo config('jspsdec'); endif; ?>

                      </p>
                      <?php if($item['is_timelimit'] == '1'): if(strtotime($item->startlimit) < intval(time()) && intval(time()) < strtotime($item->endlimit)): ?>
                          <p class="fooddescription endlimit"   data-endtime = "<?php echo $item['endlimit']; ?>" data-starttime = "<?php echo $item['startlimit']; ?>"  style="margin:3px 0;font-weight: bold;"></p>
                        <?php elseif(strtotime($item->startlimit) > intval(time())): ?>
                        <p class="fooddescription  hidecartbtn" data-id="<?php echo $item['id']; ?>"   style="margin:3px 0;color:red">团购未开始：<?php echo $item['startlimit']; ?> —— <?php echo $item['endlimit']; ?></p>
                        <?php else: ?>
                        <p class="fooddescription  hidecartbtn" data-id="<?php echo $item['id']; ?>"  style="margin:3px 0;color:red">团购已结束：<?php echo $item['startlimit']; ?> —— <?php echo $item['endlimit']; ?></p>
                        <?php endif; endif; ?>
                      <p class="fooddescription"  style="    margin: 0 0 40px 0;color:#000;font-weight: bold;">特色描述:<?php echo $item['good_desc']; ?> <br />
                        <?php if($item['goodsrule'][0]['quota'] != '0'): ?>
                            限购：<?php echo $item['goodsrule'][0]['quota']; ?>份
                        <?php endif; ?>


                      </p>


                    <?php 
                       $priceArr = array();
                       foreach($item['goodsrule'] as $data){
                          $priceArr[]= $data['rule_price'];
                       }
                       $minPrice = min($priceArr);
                       if(count($priceArr) > 1){
                            $minPriceHtml = "<span>".$minPrice."</span><span class='foodprice-lowest'>起</span>";
                       }else{
                          $minPriceHtml = "<span>".$minPrice."</span>";
                       }
                     if(groupModel() > 0): ?>
                        <strong class="foodprice" style="bottom: 10px;"><?php echo $minPriceHtml; ?>  </strong>
                    <?php else: ?>
                    <strong class="foodprice" style="bottom: 10px;"><?php echo $minPriceHtml; ?> </strong>
                    <?php endif; ?>


                  </div>
                  <div class="mask mask-transition" style="display:none;">
                      <div class="wrap">
                          <div class="container">
                              <div class="specpanel">
                                  <h1><?php echo $item['good_name']; ?></h1>
                                  <div class="candidators">
                                      <div class="candidators-group">
                                          <h2>规格</h2>
                                            <?php if(is_array($item['goodsrule']) || $item['goodsrule'] instanceof \think\Collection): $i = 0; $__LIST__ = $item['goodsrule'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voo): $mod = ($i % 2 );++$i;?>
                                              <a href="javascript:" class="candidator <?php if($i == '1'): ?>selected <?php endif; ?>" data-info="<?php echo $voo[rule_name]; ?>|<?php echo $voo[rule_price]; ?>|<?php echo $voo[stock]; ?>|<?php echo $voo[weight]; ?>" data-ruleid="<?php echo $voo[id]; ?>"><?php echo $voo[rule_name]; ?></a>
                                            <?php endforeach; endif; else: echo "" ;endif; ?>
                                      </div>
                                      <div class="selectedresult">
                                          <p class="selectedstr">已选：<?php echo $item['goodsrule'][0]['rule_name']; ?> <span class='stock'>库存：<?php echo $item['goodsrule'][0]['stock']; ?></span> <span class='weight'>重量：<?php echo $item['goodsrule'][0]['weight']; ?></span></p>
                                          <p class="price"><span class="yen">¥</span> <span class="now"><?php echo $item['goodsrule'][0]['rule_price']; ?></span> </p>
                                      </div>
                                      <a href="javascript:" class="cartadd" data-id="<?php echo $item['id']; ?>" data-ruleid="<?php echo $item['goodsrule'][0]['id']; ?>" data-dismiss="cart" data-methods="addmore" >加入购物车</a>
                                      <a href="javascript:" class="close"></a>
                              </div>
                          </div>
                      </div>
                  </div>
                </div>
                    <div class="cartbutton" style="    bottom: 5px;">
                      <span>
                        <span class="entitybutton">
                          <?php echo getRulenumhtml($item['id']); if(count($item['goodsrule']) > 1): $yjs = '0'; foreach($item['goodsrule'] as $vo): if($vo['stock'] == '0'): $yjs = '1'; endif; endforeach; if($yjs == '1'): ?>
                                <a href="javascript:"  ><span class="entityspecbutton" style="background-color: #ce4747;">已售罄</span></a>
                                <?php else: ?>
                                <a href="javascript:" class="specadd cartbtn<?php echo $item['id']; ?>"  ><span class="entityspecbutton"  >选规格</span></a>
                              <?php endif; else: if($item['goodsrule'][0]['stock'] == '0'): ?>
                                  <a href="javascript:"  ><span class="entityspecbutton" style="background-color: #ce4747;">已售罄</span></a>
                            <?php else: ?>
                              <a href="javascript:" class="oneaddcart cartbtn<?php echo $item['id']; ?>" data-dismiss="cart" data-methods="addone" ><span class="mui-icon mui-icon-plus"></span></a>
                            <?php endif; endif; ?>
                        </span>
                      </span>
                  </div>




              </section>



          </dd>

        <?php endforeach; endif; else: echo "" ;endif; ?>
      </dl>
    </div>





















    <?php if(is_array($Goodscatlist) || $Goodscatlist instanceof \think\Collection): $i = 0; $__LIST__ = $Goodscatlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
    <a class="anchor anchor_fixed" id="content<?php echo $vo['id']; ?>"></a>
    <div>
      <dl >
        <dt>
            <div class="category-title">
                <strong class="category-name"><?php echo $vo['cat_name']; ?></strong>
                <span class="category-description"></span>
            </div>
        </dt>
        <?php $_result=getGoodscat($vo['id']);if(is_array($_result) || $_result instanceof \think\Collection): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;?>
          <dd  data-ruleid="<?php echo $item['goodsrule'][0]['id']; ?>"  data-goodid="<?php echo $item['id']; ?>" style="padding-bottom: 0;">
              <span class="foodimg" style="    flex: 7;"><img  src="<?php echo get_cover($item['cover_id'],'path','400x218'); ?>" style="height:120px;" data-preview-src="" data-preview-group="<?php echo $item['id']; ?>">

                (点击图片放大缩小图片)
              </span>
              <section class="foodinfo" style="    padding: 0;"   >
                  <div onclick='javascript:window.location.href="<?php echo url($detailUrl,['id'=>$item['id']]); ?>"' >
                    <header class="foodtitle" ><span><?php echo $item['good_name']; if($item['is_timelimit'] == '1'): ?><span style="color:red">(限时团购)</span>
                      <?php endif; ?></span>
                    </header>
                    <!-- <p class="mui-ellipsis fooddescription" style="margin:3px 0;">商家:<?php echo get_table_field($item['shop_id'],"id","shopname","goodshops"); ?></p> -->


                    <p class="fooddescription"  style="margin:3px 0;font-weight: bold;color:red;">配送说明:
                      <?php if($item['isshowdelivery'] == '1'): ?>
                        <?php echo $item['deliverydec']; else: ?>
                        <?php echo config('jspsdec'); endif; ?>

                      </p>
                      <?php if($item['is_timelimit'] == '1'): if(strtotime($item->startlimit) < intval(time()) && intval(time()) < strtotime($item->endlimit)): ?>
                          <p class="fooddescription endlimit"   data-endtime = "<?php echo $item['endlimit']; ?>" data-starttime = "<?php echo $item['startlimit']; ?>"  style="margin:3px 0;font-weight: bold;"></p>
                        <?php elseif(strtotime($item->startlimit) > intval(time())): ?>
                        <p class="fooddescription  hidecartbtn" data-id="<?php echo $item['id']; ?>"   style="margin:3px 0;color:red">团购未开始：<?php echo $item['startlimit']; ?> —— <?php echo $item['endlimit']; ?></p>
                        <?php else: ?>
                        <p class="fooddescription  hidecartbtn" data-id="<?php echo $item['id']; ?>"  style="margin:3px 0;color:red">团购已结束：<?php echo $item['startlimit']; ?> —— <?php echo $item['endlimit']; ?></p>
                        <?php endif; endif; ?>
                      <p class="fooddescription"  style="    margin: 0 0 40px 0;color:#000;font-weight: bold;">特色描述:<?php echo $item['good_desc']; ?> <br />
                        <?php if($item['goodsrule'][0]['quota'] != '0'): ?>
                            限购：<?php echo $item['goodsrule'][0]['quota']; ?>份
                        <?php endif; ?>


                      </p>


                    <?php 
                       $priceArr = array();
                       foreach($item['goodsrule'] as $data){
                          $priceArr[]= $data['rule_price'];
                       }
                       $minPrice = min($priceArr);
                       if(count($priceArr) > 1){
                            $minPriceHtml = "<span>".$minPrice."</span><span class='foodprice-lowest'>起</span>";
                       }else{
                          $minPriceHtml = "<span>".$minPrice."</span>";
                       }
                     if(groupModel() > 0): ?>
                        <strong class="foodprice" style="bottom: 10px;"><?php echo $minPriceHtml; ?>  </strong>
                    <?php else: ?>
                    <strong class="foodprice" style="bottom: 10px;"><?php echo $minPriceHtml; ?> </strong>
                    <?php endif; ?>


                  </div>
                  <div class="mask mask-transition" style="display:none;">
                      <div class="wrap">
                          <div class="container">
                              <div class="specpanel">
                                  <h1><?php echo $item['good_name']; ?></h1>
                                  <div class="candidators">
                                      <div class="candidators-group">
                                          <h2>规格</h2>
                                            <?php if(is_array($item['goodsrule']) || $item['goodsrule'] instanceof \think\Collection): $i = 0; $__LIST__ = $item['goodsrule'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voo): $mod = ($i % 2 );++$i;?>
                                              <a href="javascript:" class="candidator <?php if($i == '1'): ?>selected <?php endif; ?>" data-info="<?php echo $voo[rule_name]; ?>|<?php echo $voo[rule_price]; ?>|<?php echo $voo[stock]; ?>|<?php echo $voo[weight]; ?>" data-ruleid="<?php echo $voo[id]; ?>"><?php echo $voo[rule_name]; ?></a>
                                            <?php endforeach; endif; else: echo "" ;endif; ?>
                                      </div>
                                      <div class="selectedresult">
                                          <p class="selectedstr">已选：<?php echo $item['goodsrule'][0]['rule_name']; ?> <span class='stock'>库存：<?php echo $item['goodsrule'][0]['stock']; ?></span> <span class='weight'>重量：<?php echo $item['goodsrule'][0]['weight']; ?></span></p>
                                          <p class="price"><span class="yen">¥</span> <span class="now"><?php echo $item['goodsrule'][0]['rule_price']; ?></span> </p>
                                      </div>
                                      <a href="javascript:" class="cartadd" data-id="<?php echo $item['id']; ?>" data-ruleid="<?php echo $item['goodsrule'][0]['id']; ?>" data-dismiss="cart" data-methods="addmore" >加入购物车</a>
                                      <a href="javascript:" class="close"></a>
                              </div>
                          </div>
                      </div>
                  </div>
                </div>
                    <div class="cartbutton" style="    bottom: 5px;">
                      <span>
                        <span class="entitybutton">
                          <?php echo getRulenumhtml($item['id']); if(count($item['goodsrule']) > 1): $yjs = '0'; foreach($item['goodsrule'] as $vo): if($vo['stock'] == '0'): $yjs = '1'; endif; endforeach; if($yjs == '1'): ?>
                                <a href="javascript:"  ><span class="entityspecbutton" style="background-color: #ce4747;">已售罄</span></a>
                                <?php else: ?>
                                <a href="javascript:" class="specadd cartbtn<?php echo $item['id']; ?>"  ><span class="entityspecbutton"  >选规格</span></a>
                              <?php endif; else: if($item['goodsrule'][0]['stock'] == '0'): ?>
                                  <a href="javascript:"  ><span class="entityspecbutton" style="background-color: #ce4747;">已售罄</span></a>
                            <?php else: ?>
                              <a href="javascript:" class="oneaddcart cartbtn<?php echo $item['id']; ?>" data-dismiss="cart" data-methods="addone" ><span class="mui-icon mui-icon-plus"></span></a>
                            <?php endif; endif; ?>
                        </span>
                      </span>
                  </div>




              </section>



          </dd>

        <?php endforeach; endif; else: echo "" ;endif; ?>
      </dl>
    </div>

    <?php endforeach; endif; else: echo "" ;endif; ?>

</div>

<div class="cartmask fold-transition" _v-fd8ba416="" style="display: none;"></div>
<div class="cartbody fold-transition"  style=" display:none;">
    <div class="cartheader" ><span class="cartheader-text" >购物车</span> <a href="javascript:" class="cartheader-remove" ><span class="mui-icon mui-icon-trash"></span> <span >清空</span></a></div>
    <div class="cartbody-scroller" >
        <ul class="cartlist" >
        </ul>
        <script id="tpl" type="text/html">
        {{each  as value i}}
          <li class="entityrow" data-boxruleid="{{value.rule_id}}" data-boxgoodid="{{value.good_id}}"  >
            <span class="entityname" ><em class="name" >{{value.good_name}} {{value.rule_name}}</em></span>
            <span class="entitytotal" >{{value.good_price*value.num}}</span>
            <span  class="entitycartbutton">
              <span class="entitybutton">
                <a href="javascript:" data-dismiss="cart" data-methods="minusbox" data-cartid="{{value.id}}"  style="padding:0" ><span class="mui-icon mui-icon-minus"></span></a>
                <span class="entityquantity">{{value.num}}</span>
                <a href="javascript:" data-dismiss="cart" data-methods="addbox" style="padding:0" ><span class="mui-icon mui-icon-plus"></span></a>
              </span>
            </span>
          </li>
        {{/each}}
        </script>
    </div>
</div>
<div class="van-goods-action tgou" style="background-color:#fff;"><a class="van-hairline van-goods-action-mini-btn"  style="border-right: 1px #e5e5e5 solid;">
<i class="mui-icon-extra mui-icon-extra-custom subsc" style="padding: 0;color: #666;font-size: 24px;"><!----></i>客服</a>
<a class="van-hairline van-goods-action-mini-btn "  href="javascript:;" data-dismiss="cartpopup" attr-quantity="<?php echo $cart['num']; ?>"  >
<i class="mui-icon mui-icon-extra mui-icon-extra-cart" style="    position: relative;" ><div class="van-icon__info"><?php echo $cart['num']; ?></div></i>
购物车
</a>
<a class="van-hairline van-goods-action-mini-btn cartprice"  href="javascript:;" style="min-width: 40%;"  >
<span class="carttotal" style="color:#666">¥<i><?php echo $cart['price']; ?></i></span> <span class="cartdelivery" ></span>
</a>
<?php if($cart['price'] > config('initialdeliveryprice')): ?><a href="javascript:;" data-url="<?php echo url('index/cart/frank'); ?>" class="submitbutton tgxd  " >去结算</a>
<?php elseif($cart['price'] == 0): ?><a href="javascript:;" data-url="" class="submitbutton" ><?php echo config('initialdeliveryprice'); ?>起送</a>
<?php else: ?> <a href="javascript:;" data-url="" class="submitbutton" >还差<?php echo abs($cart['price'] - config('initialdeliveryprice')); ?>元</a>
<?php endif; ?>
</div>

<link rel="stylesheet" type="text/css" href="__PUBLIC__/xsd/css/ext.css?v1111">



<!--/#footer-->

<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/xsd/js/mui.min.js"></script>
<script src="__PUBLIC__/xsd/js/flexible.js"></script>
<script src="__PUBLIC__/xsd/js/template.js"></script>

<script type="text/javascript">
  var addUrl = "<?php echo url('index/cart/add'); ?>",
      minusUrl = "<?php echo url('index/cart/minus'); ?>",
      clearUrl="<?php echo url('index/cart/clear'); ?>",
      cartListUrl ="<?php echo url('index/cart/getCartlist'); ?>";
</script>


<script src="__PUBLIC__/xsd/js/cart.js?v=1" charset="utf-8"></script>
<script>
  $(function(){
    var hei = $('header').height()+$('.pref-info').height()+$('.cnavcom').height();

      hei = hei+'px'
      $('.avoidContentHidden').css({'margin-top': hei})
      $('.anchor_fixed').css({'top': '-'+hei})

    $(document).on('click', '.tgxd' , function(){
      var url = $(this).attr('data-url'),num = parseInt($('[data-dismiss="cartpopup"]').attr('attr-quantity'))
      var subscribe = '<?php echo $subscribe; ?>';
      if(subscribe != 1){
        $.get("<?php echo url('index/getSubscribe'); ?>", function(data){
          if(data.value == 0){
            mui.alert('<img src="/public/images/qrcode_for_wx.jpg" style="width:100%;"><p style=" text-align: left;"><b>无法识别二维码</b><br />1、打开微信，点击‘添加朋友’<br />2、点击公众号<br />3、搜索公众号：贵阳鲜果屋<br />4、点击‘关注’，完成</p>', '请长按扫二维码关注公众号');
            return ;
          }else {
            if(num>0){
            window.location.href = "<?php echo $cartUrl; ?>"
            }else{
              mui.toast('请添加购买的商品！')
            }
          }
        })

      }else{
        if(num>0){
        window.location.href = "<?php echo $cartUrl; ?>"
        }else{
          mui.toast('请添加购买的商品！')
        }
      }
    })
  })

  $(function(){
    $('.pref-info').click(function(){
      var info=$(this).text()
      mui.alert(info, '公告', '关闭',function() {});
    })
  })
</script>
<style type="text/css">
  .mui-preview-image.mui-fullscreen {
    position: fixed;
    z-index: 20;
    background-color: #000;
  }

  .mui-preview-header,
  .mui-preview-footer {
    position: absolute;
    width: 100%;
    left: 0;
    z-index: 10;
  }

  .mui-preview-header {
    height: 44px;
    top: 0;
  }

  .mui-preview-footer {
    height: 50px;
    bottom: 0px;
  }

  .mui-preview-header .mui-preview-indicator {
    display: block;
    line-height: 25px;
    color: #fff;
    text-align: center;
    margin: 15px auto 4;
    width: 70px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    font-size: 16px;
  }

  .mui-preview-image {
    display: none;
    -webkit-animation-duration: 0.5s;
    animation-duration: 0.5s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
  }

  .mui-preview-image.mui-preview-in {
    -webkit-animation-name: fadeIn;
    animation-name: fadeIn;
  }

  .mui-preview-image.mui-preview-out {
    background: none;
    -webkit-animation-name: fadeOut;
    animation-name: fadeOut;
  }

  .mui-preview-image.mui-preview-out .mui-preview-header,
  .mui-preview-image.mui-preview-out .mui-preview-footer {
    display: none;
  }

  .mui-zoom-scroller {
    position: absolute;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    -webkit-backface-visibility: hidden;
  }

  .mui-zoom {
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
  }

  .mui-slider .mui-slider-group .mui-slider-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
  }

  .mui-android-4-1 .mui-slider .mui-slider-group .mui-slider-item img {
    width: 100%;
  }

  .mui-android-4-1 .mui-slider.mui-preview-image .mui-slider-group .mui-slider-item {
    display: inline-table;
  }

  .mui-android-4-1 .mui-slider.mui-preview-image .mui-zoom-scroller img {
    display: table-cell;
    vertical-align: middle;
  }

  .mui-preview-loading {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none;
  }

  .mui-preview-loading.mui-active {
    display: block;
  }

  .mui-preview-loading .mui-spinner-white {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -25px;
    margin-top: -25px;
    height: 50px;
    width: 50px;
  }

  .mui-preview-image img.mui-transitioning {
    -webkit-transition: -webkit-transform 0.5s ease, opacity 0.5s ease;
    transition: transform 0.5s ease, opacity 0.5s ease;
  }

  @-webkit-keyframes fadeIn {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  @keyframes fadeIn {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  @-webkit-keyframes fadeOut {
    0% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  @keyframes fadeOut {
    0% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  p img {
    max-width: 100%;
    height: auto;
  }
</style>
<script src="__PUBLIC__/xsd/js/mui.zoom.js"></script>
<script src="__PUBLIC__/xsd/js/mui.previewimage.js?v=21313123213321231132"></script>
<script>
  mui.previewImage();
</script>


<?php if(!(empty(config('shop_hours')) || (config('shop_hours') instanceof \think\Collection && config('shop_hours')->isEmpty()))): ?>
<script>
  var time_range = function (beginTime, endTime) {
    var strb = beginTime.split (":");
    if (strb.length != 2) {
      return false;
    }

    var stre = endTime.split (":");
    if (stre.length != 2) {
      return false;
    }

    var b = new Date ();
    var e = new Date ();
    var n = new Date ();

    b.setHours (strb[0]);
    b.setMinutes (strb[1]);
    e.setHours (stre[0]);
    e.setMinutes (stre[1]);

    if (n.getTime () - b.getTime () > 0 && n.getTime () - e.getTime () < 0) {
      return true;
    } else {

      mui.alert("<?php echo config('shop_hours_message'); ?>", '公告');
      $('.mui-popup-buttons').html(' ')
      $('.mui-popup-inner').css('border-radius', '13px')
      return false;
    }
  }

  var shop_hours = "<?php echo config('shop_hours'); ?>";
  var hours_arr = shop_hours.split('-');
  time_range (hours_arr[0], hours_arr[1]);

</script>
<?php endif; if(config('is_rest') == '1'): ?>
<script>
mui.alert("<?php echo config('rest_message'); ?>", '公告');
$('.mui-popup-buttons').html(' ')
$('.mui-popup-inner').css('border-radius', '13px')
</script>
<?php endif; if(empty(\think\Cookie::get('positioninit')) || (\think\Cookie::get('positioninit') instanceof \think\Collection && \think\Cookie::get('positioninit')->isEmpty())): ?>
<script type="text/javascript" src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script>
<script>
   var geolocation = new qq.maps.Geolocation("QQ6BZ-24HC6-ZAXSZ-MTZAU-5MU2J-HEFEH", "鲜果屋");
    geolocation.getIpLocation(showPosition, showErr)
    function showPosition(position) {
      $.getJSON("<?php echo url('index/cart/changecookie'); ?>", {name: 'positioninit', 'val': position.lat+','+position.lng}, function(json, textStatus) {});
    };
    function showErr() {
      console.log('定位失败');
    };
</script>
<?php endif; ?>


<script>
  $(function(){
    $('.subsc').click(function(){
      // $.get("<?php echo url('index/clearusersession'); ?>", function(data){
      //   if(data.code == 1){
      //     window.location.href = "http://mp.weixin.qq.com/s/-AzpDTU7eAD24-R5QUP0wg"
      //   }
      // })
      //cookie('goodsmodel_id', $model_id);
      <?php switch(cookie('goodsmodel_id')): case "1":case "2":case "3": ?>
            mui.alert("<img src=<?php echo get_cover(config('frankserviceimg'), 'path'); ?> style='width:100%;'>", '长按扫二维码');
        <?php break; endswitch; if(!(empty($contact_qc) || ($contact_qc instanceof \think\Collection && $contact_qc->isEmpty()))): ?>
            mui.alert('<img src="<?php echo $contact_qc; ?>" style="width:100%;">', '长按扫二维码');
      <?php endif; ?>
    })


    $('.endlimit').each(function(){
      var $this = $(this);
      var stime = $this.attr('data-endtime');
      var starttime = new Date(stime.replace(/-/g,"/"))
      setInterval(function () {
        var nowtime = new Date();
        var time = starttime - nowtime;
        if(time > 0){
          var day = parseInt(time / 1000 / 60 / 60 / 24);
          var hour = parseInt(time / 1000 / 60 / 60 % 24);
          var minute = parseInt(time / 1000 / 60 % 60);
          var seconds = parseInt(time / 1000 % 60);
          $this.html("距结束还有:<span style='color:red'>"+ day + "天" + hour + "小时" + minute + "分钟" + seconds + "秒</span>");
        }

      }, 1000);
    })

    $('.hidecartbtn').each(function(){
      var id = $(this).attr('data-id')
      $('.cartbtn'+id).hide();
    })


  })
</script>
</body>
</html>
